package com.bringway.p2p.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.bringway.p2p.dao.SecurityDao;
import com.bringway.p2p.service.SecurityService;

import net.sf.json.JSONObject;

/*
 * @ClassName:SecurityServiceImpl
 * @Description: 密保业务逻辑接口实现类
 * @author: qjy
 * @date: 2016年08月17日 下午3:58:53
 */
@Service
@Transactional
public class SecurityServiceImpl implements SecurityService {
	
	@Autowired
	private SecurityDao securityDao;

	@Override
	public boolean saveSecurity(JSONObject parms) {
		return securityDao.saveSecurity(parms)>0;
	}

	@Override
	public List searchSecurity(JSONObject parms) {
		// TODO Auto-generated method stub
		return securityDao.searchSecurity(parms);
	}

		/*加载用户密保问题?根据用户名查询*/
	
	@Override
	public List<Map<String, Object>> searchSecuritylist(JSONObject params) {
		
		return securityDao.searchSecuritylist(params);
	}

		/*验证密保密码是否正确根据用户键入的值查询*/
	@Override
	public List querySanswer(JSONObject params) {
		return securityDao.querySanswer(params);
	}

	@Override
	public int getSecurity(JSONObject params) {
		return securityDao.getSecurity(params);
	}
	
	
}
